package org.nobody.mallb2c.mallproduct.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.nobody.common.utils.PageUtils;
import org.nobody.mallb2c.mallproduct.entity.AttrEntity;
import org.nobody.mallb2c.mallproduct.vo.AttrGroupRelationVo;
import org.nobody.mallb2c.mallproduct.vo.AttrResVo;
import org.nobody.mallb2c.mallproduct.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author fancier
 * @email fancier2093@gmail.com
 * @date 2020-07-30 16:25:27
 */
public interface AttrService extends IService<AttrEntity> {

  PageUtils queryPage(Map<String, Object> params);

  void saveAttr(AttrVo attr);

  AttrResVo getAttrInfo(Long attrId);

  void updateAttr(AttrVo attr);

  PageUtils queryBaseOrSaleAttrPage(Map<String, Object> params, Long catelogId, String type);

  List<AttrEntity> getRelationAttr(Long attrgroupId);

  void deleteRelation(AttrGroupRelationVo[] vos);

  PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

  /**
   * 在指定的所有属性集合里面 调出可以被检索的的属性
   * @param attrIds
   * @return
   */
  List<Long> selectSearchAttrIds(List<Long> attrIds);
}

